# !/bin/bash

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from teach.student_leave_apply where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table student_leave_apply \
-m 1


/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from teach.tbh_class_time_table where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table tbh_class_time_table \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from teach.tbh_student_signin_record where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table tbh_student_signin_record \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://hadoop01:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select *, '2023-05-29 00:00:00' as dt from customer_relationship where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table customer_relationship \
-m 1


/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://hadoop01:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select *, '2023-05-29 00:00:00' as dt from customer_appeal where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table customer_appeal \
-m 1


/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://hadoop01:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select *, '2023-05-29 00:00:00' as dt from employee where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table employee \
-m 1


/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://hadoop01:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select *, '2023-05-29 00:00:00' as dt from itcast_clazz where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table itcast_clazz \
-m 1


/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://hadoop01:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select *, '2023-05-29 00:00:00' as dt from scrm_department where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table scrm_department \
-m 1


/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from customer where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table customer \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from customer_clue where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table customer_clue \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from itcast_school where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table itcast_school \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from itcast_subject where 1=1 and  \$CONDITIONS" \
--hcatalog-database onl_edu_ods \
--hcatalog-table itcast_subject \
-m 1